import csv
import tools
import numpy as np

agnews_label = []
agnews_title = []
agnews_text = []

agnews_train = csv.reader(open('datasets/train.csv', 'r', encoding='utf-8'))
for line in agnews_train:
    agnews_label.append(np.float32(line[0]))
    agnews_title.append(tools.clear_text([1].lower()))
    agnews_text.append(tools.clear_text([2].lower()))



